/**
 * Created by henian.xu on 2017/3/25.
 * 公共脚本
 */

//公告滚动
(function () {
  var navNotice_ = $('.notice'),
    ul_ = navNotice_.find('ul:first');
  if (ul_.children('li').length < 2)return;
  setInterval(function () {
    ul_.animate({marginTop: -navNotice_.height()}, 500, function () {
      ul_.css({marginTop: 0}).children('li:first').appendTo(ul_);
    });
  }, 3000);
})();

//bannerAD
var bannerAD = new Swiper('#bannerAD', {
  autoplay: 3 * 1000,
  speed:1000,
  loop: true,
  paginationClickable: true,
  direction: 'vertical',
  mode: 'vertical',
  preventClicks: false
});

//slider
var swiper = new Swiper('#slider', {
  autoplay: 3 * 1000,
  speed:1000,
  loop: true,
  pagination: '.swiper-pagination',
  paginationClickable: true
});

//slider small
var swiper = new Swiper('#slider-small', {
  autoplay: 3 * 1000,
  speed:1000,
  loop: true,
  pagination: '.swiper-pagination',
  paginationClickable: true
});
